﻿namespace OrderMicroService.Types.Types
{
    /// <summary>
    /// 商品ID
    /// </summary>
    public class ItemId : IIdentifier
    {
        private readonly long value;
        public long Value => value;
        public ItemId(long value)
        {
            Validate(value);
            this.value = value;
        }

        public void Validate(long value)
        {
            if (value < 0)
            {
                throw new System.ArgumentException("ItemId Error");
            }
        }
    }
}